import request from '@/utils/request'

// 首页请求
export const getArticle = params => request.get('/h5/interview/query', { params })
// 面经详情页
export const getDetail = params => request.get('/h5/interview/show', { params })
// 获取点赞数据
export const setLike = id => request.post('/h5/interview/opt', {
  id,
  optType: 1
})
// 获取收藏数据
export const setCollect = id => request.post('/h5/interview/opt', {
  id,
  optType: 2
})
// 渲染点赞页面
export const getLike = obj => request.get('/h5/interview/opt/list', {
  params: {
    optType: 1,
    pageSize: 2,
    page: obj.page
  }
})
// 渲染收藏页面
export const getCollect = obj => request.get('/h5/interview/opt/list', {
  params: {
    page: obj.page, // 当前页
    pageSize: 5, // 可选
    optType: 2 // 表示收藏
  }
})
